-
Notifications
You must be signed in to change notification settings - Fork 43
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Resolve 2 spotbugs issues and increase spotbugs checks #100
Resolve 2 spotbugs issues and increase spotbugs checks #100
Conversation
prince-panwar
commented
Feb 10, 2023
- Make sure you are opening from a topic/feature/bugfix branch (right side) and not your main branch!
- Ensure that the pull request title represents the desired changelog entry
- Please describe what you did
Increase chance of bug detecting
Co-authored-by: Mark Waite <mark.earl.waite@gmail.com>
hi, mark I have successfully fixed 3 out of 5 bugs , but I am stuck at two similar bugs:- |
I am not sure what is the best way to deal with these bugs |
Add an exclusions filter file as described in the tutorial. Exclude those two issues. It is also OK to include all 5 issues in the exclusions filter file. Excluding a spotbugs warning does not make the code any worse and reduces the risk that future changes will introduce issues that could have been detected by spotbugs. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks! I think that some of the changes may be safer to exclude in the filter file rather than make a change in the production code. Alternate ideas are welcome. See my questions with individual changes.
src/main/java/org/jenkinsci/plugins/GitLabAuthenticationToken.java
Outdated
Show resolved
Hide resolved
thanks, I'll fix these in next commit |
to suppress some bugs that are safe to be ignored
I added the exclusion file but spot bugs is still showing bugs . what am i doing wrong? |
No longer defined in the parent pom
There were several mistakes in Mistakes included:
Thanks for the submission! |
I also set the |
I needed b7510e7 to undo the change to the |
src/main/java/org/jenkinsci/plugins/GitLabOAuthUserDetails.java
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Approved with changes as they are now.
Should be squash merged when it is merged. |
with email property from gitlab4j.api.models.User hard coded values might not be appropriate for all cases may cause issues in the application
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The new call to user.getEmail()
needs to be removed. It does not belong in this pull request.
This reverts commit b2b71a2.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks again!